import {sm2} from "sm-crypto";

const publicKey: string =
  "04F6E0C3345AE42B51E06BF50B98834988D54EBC7460FE135A48171BC0629EAE205EEDE253A530608178A98F1E19BB737302813BA39ED3FA3C51639D7A20C7391A";

//加密
export function encrypt(txt: string): any {
  return "04" + sm2.doEncrypt(txt, publicKey, 0).toUpperCase();
}
